Optimal. Leaf size=92 \[ \frac {x}{2 a^3}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{a^3 d}-\frac {3 \cos (c+d x)}{a^3 d}+\frac {\cos ^3(c+d x)}{3 a^3 d}-\frac {\cot (c+d x)}{a^3 d}+\frac {3 \cos (c+d x) \sin (c+d x)}{2 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 8, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.276, Rules used = {2954, 2788,
3855, 3852, 8, 2718, 2715, 2713} \begin {gather*} \frac {\cos ^3(c+d x)}{3 a^3 d}-\frac {3 \cos (c+d x)}{a^3 d}-\frac {\cot (c+d x)}{a^3 d}+\frac {3 \sin (c+d x) \cos (c+d x)}{2 a^3 d}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{a^3 d}+\frac {x}{2 a^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2718
Rule 2788
Rule 2954
Rule 3852
Rule 3855
Rubi steps
\begin {align*} \int \frac {\cos ^6(c+d x) \cot ^2(c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\int \cot ^2(c+d x) (a-a \sin (c+d x))^3 \, dx}{a^6}\\ &=\frac {\int \left (2 a^5-3 a^5 \csc (c+d x)+a^5 \csc ^2(c+d x)+2 a^5 \sin (c+d x)-3 a^5 \sin ^2(c+d x)+a^5 \sin ^3(c+d x)\right ) \, dx}{a^8}\\ &=\frac {2 x}{a^3}+\frac {\int \csc ^2(c+d x) \, dx}{a^3}+\frac {\int \sin ^3(c+d x) \, dx}{a^3}+\frac {2 \int \sin (c+d x) \, dx}{a^3}-\frac {3 \int \csc (c+d x) \, dx}{a^3}-\frac {3 \int \sin ^2(c+d x) \, dx}{a^3}\\ &=\frac {2 x}{a^3}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{a^3 d}-\frac {2 \cos (c+d x)}{a^3 d}+\frac {3 \cos (c+d x) \sin (c+d x)}{2 a^3 d}-\frac {3 \int 1 \, dx}{2 a^3}-\frac {\text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d}-\frac {\text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}\\ &=\frac {x}{2 a^3}+\frac {3 \tanh ^{-1}(\cos (c+d x))}{a^3 d}-\frac {3 \cos (c+d x)}{a^3 d}+\frac {\cos ^3(c+d x)}{3 a^3 d}-\frac {\cot (c+d x)}{a^3 d}+\frac {3 \cos (c+d x) \sin (c+d x)}{2 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.69, size = 126, normalized size = 1.37 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6 \left (6 (c+d x)-33 \cos (c+d x)+\cos (3 (c+d x))-6 \cot \left (\frac {1}{2} (c+d x)\right )+36 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-36 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 \sin (2 (c+d x))+6 \tan \left (\frac {1}{2} (c+d x)\right )\right )}{12 d (a+a \sin (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 125, normalized size = 1.36
method | result | size |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {-6 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {32}{3}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{3}}\) | \(125\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {-6 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-8 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-24 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {32}{3}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{3}}\) | \(125\) |
risch | \(\frac {x}{2 a^{3}}-\frac {3 i {\mathrm e}^{2 i \left (d x +c \right )}}{8 d \,a^{3}}-\frac {11 \,{\mathrm e}^{i \left (d x +c \right )}}{8 d \,a^{3}}-\frac {11 \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d \,a^{3}}+\frac {3 i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 d \,a^{3}}-\frac {2 i}{a^{3} d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{3}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{3}}+\frac {\cos \left (3 d x +3 c \right )}{12 d \,a^{3}}\) | \(157\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 285 vs.
\(2 (86) = 172\).
time = 0.51, size = 285, normalized size = 3.10 \begin {gather*} -\frac {\frac {\frac {32 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {9 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {72 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {9 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {24 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {21 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + 3}{\frac {a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {3 \, a^{3} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {a^{3} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}} - \frac {6 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} + \frac {18 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} - \frac {3 \, \sin \left (d x + c\right )}{a^{3} {\left (\cos \left (d x + c\right ) + 1\right )}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 104, normalized size = 1.13 \begin {gather*} -\frac {9 \, \cos \left (d x + c\right )^{3} - {\left (2 \, \cos \left (d x + c\right )^{3} + 3 \, d x - 18 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) - 9 \, \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 9 \, \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, \cos \left (d x + c\right )}{6 \, a^{3} d \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 147, normalized size = 1.60 \begin {gather*} \frac {\frac {3 \, {\left (d x + c\right )}}{a^{3}} - \frac {18 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} + \frac {3 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{3}} + \frac {3 \, {\left (6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} - \frac {2 \, {\left (9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 36 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 16\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3} a^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.12, size = 231, normalized size = 2.51 \begin {gather*} \frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^3\,d}-\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+24\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {32\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+1}{d\,\left (2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+6\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+6\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}-\frac {\mathrm {atan}\left (\frac {1}{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+6}-\frac {6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+6}\right )}{a^3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________